#ifdef SDCC
#include <at89x52.h>
#else
#include <reg52.h>
#include <intrins.h>
#endif
#include "utils/msclibs.h"
#include "lcd/Lcd.h"
 
void main(void)  
{   
    int i = 0;
    int color=0;
    unsigned int com,seg; 
    unsigned char LED;
    LCD_init();
    // LCD_clear(5);
    

    Address_set(0,239, 0,399);
    for(com=0;com<400;com++)
    {
        color+=0xffff/400;
        for(seg=0;seg<240;seg++)
        {
             // WriteData_Xbit(color);
             LCD_Wirte_Data16(color);            
        }
    }
    LCD_clear(4);
    LCD_ShowString(20,90,colors[7],colors[4],"INIT SUCCESS");
    LED = 0xfe; //1111 1110
    while(1){
        LCD_ShowInt(20,120,colors[7],colors[4],i);
        i++;
        P1=LED;
        LED = (LED<<1)+1;
        if(P1 == 0x7f )     {LED = 0xfe;  }
        delay_ms(100);
    }
}